package com.run.cat.common.base;

import lombok.Data;

@Data
public class BasePage {

    /**
     * 每页显示条数，默认 10
     */
    private int size = 20;

    /**
     * 当前页
     */
    private int current = 1;

    /**
     * 当前条数
     */
    private int count;

    public int getCount() {
        return size * (current - 1);
    }

    /**
     * 手写SQL分页所需 by zhengqiang
     * @return
     */
    public int getLimit() {
        return (current - 1) * size;
    }

}
